const express = require('express');
const router = express.Router();
const position_handler = require('../router_handler/position');

const expressJoi = require('@escook/express-joi');
const {
	addPosition_schema,
	deletePosition_schema,
	updatePosition_schema,
	startPosition_schema
} = require('../schema/position');

// 添加岗位
router.post('/addPosition', expressJoi(addPosition_schema), position_handler.addPosition);
// 删除岗位
router.post('/deletePosition', expressJoi(deletePosition_schema), position_handler.deletePosition);
// 修改岗位
router.post('/updatePosition', expressJoi(updatePosition_schema), position_handler.updatePosition);
// 启用，禁用岗位
router.post('/startPosition', expressJoi(startPosition_schema), position_handler.startPosition);
// 选择框查询岗位
router.get('/getPosition', position_handler.getPosition);
// 查询岗位列表
router.get('/getPositionList', position_handler.getPositionList);

module.exports = router;